entry: Fix get_text_allocation
authorTimm Bäder <mail@baedert.org>
Wed, 10 Jan 2018 09:49:13 +0000 (10:49 +0100)
committerTimm Bäder <mail@baedert.org>
Wed, 10 Jan 2018 09:49:13 +0000 (10:49 +0100)
These should be reported in GtkEntry coordinates, so relative to the
entry's origin. This fixes entrys with top/bottom padding applied.

gtk/gtkentry.c

index 7ecec902e48723db2796408e167ac73920c1b6b0..fd3742d1998a459a5b1daaed7965c7ce83c3118e 100644 (file)
@@ -3076,9 +3076,10 @@ gtk_entry_get_text_allocation (GtkEntry     *entry,
 {
   GtkEntryPrivate *priv = entry->priv;
 
-  gtk_widget_get_own_allocation (GTK_WIDGET (entry), allocation);
   allocation->x = priv->text_x;
+  allocation->y = 0;
   allocation->width = priv->text_width;
+  allocation->height = gtk_widget_get_height (GTK_WIDGET (entry));
 }
 
 static void